<?php
error_reporting(0);
include("views/lang/lang_fr.php");
session_start();
if ($_GET["l"] == "fr") {
    include("views/lang/lang_fr.php");
    $_SESSION['lang'] = "fr";
} else {
    include("views/lang/lang_en.php");
    $_SESSION['lang'] = "en";
}
?>
<html>
    <head>

        <link rel="stylesheet" href="../views/css/style_menu.css" type="text/css"/>
        <link rel="stylesheet" href="../views/css/mini3537.css" type="text/css"/>
        <link rel="stylesheet" href="../views/css/mini74d5.css" type="text/css"/>
        <link rel="stylesheet" href="../views/css/template.css" type="text/css"/>

        <!-- include script js -->
        <script type="text/javascript" src="../views/js/jquery-1.6.min.js"></script>
        <script> 
        
            $(document).ready(function(){

            
                $("#form").live("submit",function(event){

                    event.preventDefault();
        
        
                    $.post("test_login",{ log :$("#login").val(),password :$("#pass").val()},function(data) { 
                        $(location).attr("href", data);    
                    }    
                );
               });
                     
            });
        
        </script>
    </head>

    <body class="special-page login-bg dark">

        <section id="message">
            <div class="block-border">
                <div class="block-content no-title dark-bg">
                   
  <form name="language" methode="GET" action="login">
                        <button class="grey" id="display_al" name="l" value="fr" onClick="this.form.action='login';this.form.submit()"  onMouseOver="style.cursor='hand'"><img src="../views/image/fr.jpg" ></button>
                        <button class="grey" id="display_al" name="l" value="en" onClick="this.form.action='login';this.form.submit()"  onMouseOver="style.cursor='hand'"><img src="../views/image/en.jpg"></button>
                    </form>
                    
                </div>
            </div>
        </section>

        <section id="login-block">
            <div class="block-border">
                <div class="block-content">
                    <h1><?php echo $logname ?></h1>
                    <div class="block-header"><?php echo $loghi ?></div>

                    <form id="form" class="form with-margin" action="test_login" method="post" name="login-form">
                        <input id="a" type="hidden" value="send" name="a">
                        <p class="inline-small-label">
                            <label for="login">
                                <span class="big"><?php echo $lognom ?></span>
                            </label>
                            <input id="login" class="full-width" type="text" value="" name="login">
                        </p>
                        <p class="inline-small-label">
                            <label for="pass">
                                <span class="big"><?php echo $logpass ?></span>
                            </label>
                            <input id="pass" class="full-width" type="password" value="" name="pass">
                        </p>
                        <button class="float-right" type="submit" id="send"><?php echo $logconn ?></button>


                    </form>

                </div>
            </div>
        </section>
    </body>

</html>



